﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VonaJobs.BLL;
using VonaJobs.DAL.DAO;

namespace VonaJobs.UI.Admin
{
    public partial class AddLocation : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        public void AddJobLocation(object sender, EventArgs eventArgs)
        {
            try
            {
                Location location = new Location();
                LocationManager locationManager = new LocationManager();

                location.Country = selectCountry.Value;
                location.City = txtCityName.Value;
                string msg = locationManager.CreateNewLocation(location);


            }
            catch (Exception)
            {

                throw;
            }
        }
        public  void UpdateJobLocation(object sender,EventArgs eventArgs)
        {
            try
            {
                Location location = new Location();
                LocationManager locationManager = new LocationManager();

                location.Country = selectCountry.Value;
                location.City = txtCityName.Value;
                string msg = locationManager.UpdateJobLocation(location);
            }
            catch (Exception)
            {
                
                throw;
            }
        }
    }
}